﻿using System;

namespace Microsoft.Popfly.GameCreator.Data
{
    public abstract class BehaviorInfo
    {
        public class AudioInfo
        {
            [GameXamlProperty]
            public String Name;
            [GameXamlProperty]
            public String Url;
        }
        [GameXamlProperty]
        public String Name;

        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "", objectType = typeof(LoadEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "Load", objectType = typeof(LoadEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "Disappear", objectType = typeof(DisappearEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "collision", objectType = typeof(CollisionEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "ViewportEnter", objectType = typeof(ViewportEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "ViewportLeave", objectType = typeof(ViewportEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "SceneLeave", objectType = typeof(SceneEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "SceneEnter", objectType = typeof(SceneEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "keys", objectType = typeof(KeyEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "timer", objectType = typeof(TimerEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "mouse", objectType = typeof(MouseEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "PropertyChange", objectType = typeof(PropertyChangeEventInfo))]
        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex, attributeName = "Type", attributeValue = "StateChange", objectType = typeof(StateChangeEventInfo))]
        public EventInfo Event;

        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex)]
        public EffectInfo Effect;

        [GameXamlProperty(xamlMappingType = GameXamlProperty.XamlType.complex)]
        public AudioInfo Audio;

        [GameXamlProperty(nodeName="Type")]
        public string BehaviorType;
    }
}